<%@ include file="/common/taglibs.jsp"%>
<head>
	<title><fmt:message key="authoriy.file.manager" /></title>
	<script type="text/javascript"
		src="<c:url value='/ext/scripts/index/index.js'/>">
</script>
	<script language="javascript" type="text/javascript"
		src="/zywx3/ext/scripts/display/displaypage.js">
</script>
	<script type="text/javascript">
function getListByProperties(strvalue) {
	return strvalue.split(',');
}
function delcontent() {
	var message = "<fmt:message key='content.del.ok'/>";
	if (confirm(message)) {
		return true;
	} else {
		return false;
	}
}
jQuery(document).ready(
				function() {
					jQuery("#displayallpage").val(${displayallpage});
	                jQuery("#tz").val(${thispage});
	                
					var downlaodresult=jQuery("#downlaodresultid").val();
	                if(null!=downlaodresult&&downlaodresult!=""){
	                	alert(downlaodresult);
	                }
				});
				
</script>
</head>
<div class="box_big">
	<form:form method="post" commandName="authoriyid"
		action="${ctx}/attachment/fileDownload.html" id="searchForm">
		<input id="downlaodresultid" type="hidden" value="${downlaodresult}" />
		<div class="bj_biao" onclick="hiddenselectcon();">
			<h4>
				<fmt:message key="authoriy.file.manager" />
			</h4>
		</div>
		<div class="box5" id="selectcondiv" style="display: none;">
			<table border="0" cellspacing="0" cellpadding="0" class="table_cx2"
				align="center">
				<tr height="18" align="center">
					<td>
						<fmt:message key="authoriy.name" />
						:
					</td>
					<td>
						<form:input path="fileName" cssClass="text4" />
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
					<td>
						<fmt:message key="authoriy.filetype" />
						:
					</td>
					<td>
						<form:select id="filetypeid" path="fileType" cssClass="text4">
							<c:forEach var="c" items="${attachmenttypelist}">
								<form:option value="${c.key}">
									${c.value}
								</form:option>
							</c:forEach>
						</form:select>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
					<td>
						<fmt:message key="authoriy.isrelease" />
						:
					</td>
					<td>
						<form:select path="isRelease" id="fileisreleaseid"
							cssClass="text4">
							<c:forEach var="c" items="${isreleaselist}">
								<form:option value="${c.key}">
									${c.value}
								</form:option>
							</c:forEach>
						</form:select>
					</td>
					<td>
						<input type="submit" value="<fmt:message key="button.search"/>"
							class="btn_blue2" />
					</td>
				</tr>
			</table>
		</div>
		<div class="box5">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr height="30" valign="top">
					<td align="left">
						<input type="button"
							onclick="location.href='<c:url value="/filemanage/queryuploadfile.html"/>'"
							value="<fmt:message key="authoriy.upload.new.file"/>"
							class="btn_blue2" />
						<c:if test="${null!=resultstr}">
							<span style="color: red;">${resultstr}</span>
						</c:if>
					</td>
				</tr>
			</table>
		</div>

	</form:form>
	<display:table name="downLoadList" cellspacing="0" cellpadding="0"
		requestURI="" style="width:100%;" defaultsort="1" id="file"
		pagesize="${pagesize}" class="table_cx" export="true"
		size="${resultSize}" partialList="true">
		<display:column property="id" escapeXml="true" sortable="true"
			titleKey="authoriy.id" style="border-left:1px solid #feb808;" />
		<display:column property="fileName" escapeXml="true" sortable="true"
			titleKey="authoriy.name" />
		<display:column sortable="true" titleKey="authoriy.filetype">
			<c:if test="${file.fileType==1}">
				<fmt:message key="authoriy.type.file" />
			</c:if>
			<c:if test="${file.fileType==2}">
				<fmt:message key="authoriy.type.soft" />
			</c:if>
		</display:column>
		<display:column sortable="true" titleKey="authoriy.isrelease">
			<c:if test="${file.isRelease==1}">
				<fmt:message key="authoriy.isrelease.yes" />
			</c:if>
			<c:if test="${file.isRelease==2}">
				<fmt:message key="authoriy.isrelease.no" />
			</c:if>
		</display:column>
		<display:column escapeXml="true" sortable="true"
			titleKey="authoriy.size">
				${file.fileSize} MB
			</display:column>
		<display:column titleKey="user.operate" autolink="true" media="html"
			style="border-right:1px solid #feb808;">
			<a href="${ctx}/attachment/attachmentinfo.html?id=${file.id}"><fmt:message
					key="content.info" /> </a>
			<a
				href="${ctx}/attachment/download.html?fpath=${file.filePath}&pathtype=3&thispage=${thispage}&pagename=${pagename}&name=${file.fileName}">
				<fmt:message key="authoriy.download" /> </a>
			<a
				href="${ctx}/attachment/queryupdatefile.html?achid=${file.id}&thispage=${thispage}&pagename=${pagename}"><fmt:message
					key="content.update" /> </a>&nbsp;&nbsp;&nbsp;
			<a
				href="${ctx}/attachment/deleteattachment.html?id=${file.id}&thispage=${thispage}&pagename=${pagename}"
				onclick="return delcontent()"><fmt:message key="content.delete" />
			</a>
		</display:column>
		<display:setProperty name="export.pdf" value="false" />
		<display:setProperty name="export.csv" value="false" />
		<display:setProperty name="export.xml" value="false" />
	</display:table>
	<c:if test="${filelistresult == 'false'}">
		<fmt:message key="authoriy.notdownload.file" />
	</c:if>
</div>
